package objects;

import java.util.Random;

import map.Level;

public class EnemyFactory {
	
	private static EnemyFactory enemyFactory;
	
	public static EnemyFactory getInstance() {
		if(enemyFactory == null) {
			enemyFactory = new EnemyFactory();
		}
		return enemyFactory;
	}
	
	private EnemyFactory() {
		
	}
	
	public void moveEnemy(Enemy enemy, Level room) {
		
		Random random = new Random();
		if(random.nextBoolean()) {
			enemy.setxPosition(enemy.getxPosition()+1);
		} else {
			enemy.setxPosition(enemy.getxPosition()-1);
		}
		
	}
}
